<template>
    <div class=''>
        <div class="content">
            <list-message v-if="playVideoFlag == 'list'"></list-message>
            <myMessage :sendData="sendData" v-else></myMessage>
        </div>
        <div class="footer">
            <div class="footer_left" :class="{ 'blue': playVideoFlag == 'list' }" @click="listHandler">
                <i class="el-icon-time" style="font-size: 24px;"></i>
                <div style="font-size: 14px;font-weight: 900;">记录</div>
            </div>
            <div class="footer_right" :class="{ 'blue': playVideoFlag == 'my' }" @click="myHandler">
                <i class="el-icon-user" style="font-size: 24px;"></i>
                <div style="font-size: 14px;font-weight: 900;">我的</div>
            </div>
        </div>
    </div>
</template>

<script>
import listMessage from './listMessage'
import myMessage from './myMessage'
export default {
    name: 'bilibili',
    props:['sendData'],
    data() {
        return {
            playVideoFlag: 'list',//控制列表界面和我的界面的显隐
        };
    },
    components: {
        listMessage,
        myMessage,
    },
    created() {

    },
    mounted() {

    },
    methods: {
        //点击消息图标触发的回调
        listHandler() {
            this.playVideoFlag = 'list';
        },
        //点击我的图标触发的回调
        myHandler() {
            this.playVideoFlag = 'my';
        },
    },
};
</script>

<style lang='scss' scoped>
.blue {
    color: #f4acc5;
}

.content {
    height: 822px;
}

.footer {
    height: 50px;
    border-top: 1px solid #e4e4e4;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    cursor:pointer;

    .footer_left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
</style>